<%--
  Created by IntelliJ IDEA.
  User: liu'teng
  Date: 2021/10/12
  Time: 18:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户登录</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="http://code.jquery.com/jquery-2.0.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script>
        window.onload=function () {
            var vcode=document.getElementById("vcode");
            vcode.onclick=function () {
                this.src="${pageContext.request.contextPath}//checkcodeservlet?"+new Date().getTime();
            }
        }
    </script>
</head>
<body>
<div class="container" style="width: 400px" >
    <h3 style="text-align: center">管理员登录</h3>
    <form action="${pageContext.request.contextPath}/loginservlet" method="post">
        <div class="form-group">
            <label for="user">用户名：</label>
            <input type="text" name="user" class="form-control" id="user" placeholder="请输入用户名"/>
        </div>
        <div class="form-group">
            <label for="password">密码：</label>
            <input type="text" name="password" class="form-control" id="password" placeholder="请输入密码"/>
        </div>
        <div class="form-inline">
            <label for="verifycode">验证码：</label>
            <br>
            <input type="text" name="verifycode" class="form-control" id="verifycode" placeholder="请输入验证码" style="float: left ;width: 120px"/>
            <a href="javascript:refreshCode()" style="margin-left: 20px"><img src="${pageContext.request.contextPath}/checkcodeservlet" title="看不清点击刷新" id="vcode"/></a>
        </div>
        <br/>
        <div class="form-group" style="margin-left: 40%">
            <input class="btn btn btn-primary" type="submit" value="登录">
        </div>
    </form>
    <div class="alert alert-warning alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <strong>Warning!</strong> ${pageContext.request.getAttribute("error")}
    </div>
</div>
</body>
</html>
